package org.tlipoca.smusersubscribe.client;

import org.genntii.smcommon.result.Result;
import org.genntii.smdomain.entity.Channel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;

@FeignClient("sm-channel")
public interface ChannelClient {

    @GetMapping("/channel/exists/{channelId}")
    Result<Boolean> channelExists(@PathVariable Long channelId);

    @GetMapping("/channel")
    Result<Channel> getChannelById(@RequestParam("channelId") Long channelId);

    @GetMapping("/channel/channelBatch")
    Result<ArrayList<Channel>> getChannelBatch(@RequestParam("channelIds") ArrayList<Long> channelIds);
}
